<?php
class ResourcePage extends AppModel{
	public $name='ResourcePage';
	
	public $validate = array(		
		'name' => array(array('rule'=>'notEmpty','message'=>'Can not be empty!'),
						array('rule'=>array('uniqueTree','name','resource_category_id'),'message'=>'data is already existed'))	
	);
	 //public $actsAs = array('Translate'=>array('translate'));
	 public $belongsTo = array(        
			'ResourceCategory' => array(
			    'className'    => 'ResourceCategory'
			)
    	);  
    	
    	public $hasMany = array(
        'Resource' => array(
            'className'     => 'Resource', 
 			
            'dependent'=> true
        )
    );  
			
}
?>
